<script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<link  type="text/css" href="https://www.layuicdn.com/layui/css/layui.css" rel="stylesheet"/>
<script type="text/javascript" src="https://www.layuicdn.com/layui/layui.js"></script>
<script type="text/javascript">
    layui.config({
      dir: 'https://www.layuicdn.com/layui/' 
      ,version: false 
      ,debug: false 
      ,base: '' 
    });
</script>
<div style="display: flex;flex-direction: row;">
    <div style="margin: 10px;width: 300px;margin-left: 10px;">
        <div style="margin: 10px;text-align: center;font-size: 20px;">修改</div>
        <div style="margin: 10px;">分享朋友圈：</div>
        <img style="height: 40px;margin: 10px;" src="https://www.dcdev.net/icon.png" />
        <div><input style="margin: 10px;width: 90%;" id="edit_share_moment_title"  placeholder="分享到朋友圈的标题" /></div>
        <div style="display: flex;flex-direction: row;align-items: center;margin: 10px;">
            <span>链接：</span>
            <form class="layui-form" action="">
                <div class="layui-form-item" style="margin-bottom: 0px;">
                    <div class="layui-input-block" style="display:flex;margin-left: 0px;">
                    <input type="radio" lay-filter="link_choose" name="link_choose" value="当前地址" title="当前地址" checked>
                    <input type="radio" lay-filter="link_choose" name="link_choose" value="固定地址" title="固定地址" >
                    </div>
                </div>
            </form>
        </div>
        <div><input style="margin: 10px;margin-top:0px;width: 90%;display: none;" id="edit_share_moment_link"  placeholder="地址的URL" /></div>
        <hr>
        <div style="margin: 10px;">分享给好友或者群：</div>
        <img style="height: 40px;margin: 10px;" src="https://www.dcdev.net/icon.png" />
        <div><input style="margin: 10px;width: 90%;" id="edit_share_moment_title"  placeholder="分享给好友或者群的标题" /></div>
        <div style="display: flex;flex-direction: row;align-items: center;margin: 10px;">
            <span>链接：</span>
            <form class="layui-form" action="">
                <div class="layui-form-item" style="margin-bottom: 0px;">
                    <div class="layui-input-block" style="display:flex;margin-left: 0px;">
                    <input type="radio" lay-filter="link_choose_2" name="link_choose_2" value="当前地址" title="当前地址" checked>
                    <input type="radio" lay-filter="link_choose_2" name="link_choose_2" value="固定地址" title="固定地址" >
                    </div>
                </div>
            </form>
        </div>
        <div><input style="margin: 10px;margin-top:0px;width: 90%;display: none;" id="edit_share_moment_link_2"  placeholder="地址的URL" /></div>
        <hr>
        <div><textarea style="margin: 10px;width: 90%;" id="edit_share_moment_title"  placeholder="描述内容" ></textarea></div>
    </div>


    <div id="show_share" style="margin: 10px;width: 300px;margin-left: auto;justify-content: center;display: flex;flex-direction: column;">
        <div style="margin: 10px;text-align: center;font-size: 20px;">样式</div>              
        <div style="margin: 10px;">分享朋友圈：</div>
        <div style="background-color: rgb(247,247,247);display: flex;flex-direction: row;align-items: center;height: 50px;">
            <img style="height: 40px;margin: 5px;" src="https://www.dcdev.net/icon.png" />
            <div>分享到朋友圈的标题</div>
        </div>
        <div style="margin: 10px;">分享给好友或者群：</div>
        <div style="background-color: rgb(247,247,247);display: flex;flex-direction: column;">
            <div style="margin:10px;">分享给好友或者群的标题</div>
            <div style="display: flex;flex-direction: row;justify-content: flex-start;">
                <div style="font-size: 15px;color: gray;margin-left: 10px;">描述内容</div>
                <img style="height: 40px;margin: 10px;margin-left: auto;" src="https://www.dcdev.net/icon.png" />
            </div>
        </div>
    </div>
</div>

<script>
    layui.use('form', function () {
        var form = layui.form;
        window['link_choose'] = {
            value: '当前地址'
        };
        window['link_choose_2'] = {
            value: '当前地址'
        };
        form.on("radio(link_choose)", function (obj) {
            window['link_choose'] = obj;
            console.log(obj)
            if(obj.value=="固定地址"){
                $('#edit_share_moment_link').css('display','inline');
            }else{
                $('#edit_share_moment_link').css('display','none');
            }
        })
        form.on("radio(link_choose_2)", function (obj) {
            window['link_choose_2'] = obj;
            console.log(obj)
            if(obj.value=="固定地址"){
                $('#edit_share_moment_link_2').css('display','inline');
            }else{
                $('#edit_share_moment_link_2').css('display','none');
            }
        })
    });
</script>

